package com.sztx.worker_monitor.web.model;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import com.sztx.worker_monitor.web.page.TbsIndexPage;

public class SearchListModel {
		private Set<String>  	jobNames = new HashSet<String>();
		private Set<String> 	scheduleNames = new HashSet<String>();

		
		
		public SearchListModel() {
			super();
		}

		public SearchListModel( List<QuartzModel> quartzModels) {
			if(quartzModels == null ) return;
			for(QuartzModel quartzModel:quartzModels){
				jobNames.add(quartzModel.getJobName());
				scheduleNames.add(quartzModel.getSchedName());
			}
		}
		
		public SearchListModel(TbsIndexPage tbsIndexPage) {
			if(tbsIndexPage == null ) return;
			if(tbsIndexPage.getTbsList() == null ) return;
			for(TbsModel tbsModel:tbsIndexPage.getTbsList()){
				jobNames.add(tbsModel.getTaskName());
				scheduleNames.add(tbsModel.getScheduleName());
			}
		}
		
		
		
		
		 
		public Set<String> getJobNames() {
			return jobNames;
		}

		public void setJobNames(Set<String> jobNames) {
			this.jobNames = jobNames;
		}

		public Set<String> getScheduleNames() {
			return scheduleNames;
		}

		public void setScheduleNames(Set<String> scheduleNames) {
			this.scheduleNames = scheduleNames;
		}

		public void addJobName(String jobName){
			jobNames.add(jobName);			
			
		}
		
		public void addScheduleName(String scheduleName){
						
			scheduleNames.add(scheduleName);
		}
		
}
